//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
// 

package arplab.main;

import arplab.net_descriptions.*;

network SwitchedArp
{
    types:
        channel Channel extends ned.DatarateChannel
        { datarate = 100Mbps; }
    submodules:
        host1: Host {};
        host2: Host {};
        host3: Host {};
        host4: Host {};
        switch: Switch {};
    connections:
        host1.toSwitch    --> Channel --> switch.fromHost[0];
        host1.fromSwitch  <-- Channel <-- switch.toHost[0];
        host2.toSwitch    --> Channel --> switch.fromHost[1];
        host2.fromSwitch  <-- Channel <-- switch.toHost[1];
        host3.toSwitch    --> Channel --> switch.fromHost[2];
        host3.fromSwitch  <-- Channel <-- switch.toHost[2];
        host4.toSwitch    --> Channel --> switch.fromHost[3];
        host4.fromSwitch  <-- Channel <-- switch.toHost[3];
}